From: Sebastian Keller Date: Thu, 4 Feb 2021 01:17:08 +0000 (+0100) Subject: mpris: Hide unused elements to leave more space for the title X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~469 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c61e1e5c2c6fb86b53c2eb7509d2599b50b083d5;p=gnome-shell.git mpris: Hide unused elements to leave more space for the title The Message class this is derived from unconditionally adds a close button with 0 opacity that only gets shown on hover for messages that can actually be closed. The MPRIS MediaMessage however can never be closed and having a close button can cause the title to be cut short unexpectedly. Similarly the secondary text which other notifications use to display the notification time is always left empty here as well. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3664 Part-of: --- diff --git a/js/ui/mpris.js b/js/ui/mpris.js index 4e541d8a0..b7cc8ea19 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -28,6 +28,10 @@ class MediaMessage extends MessageList.Message { this._icon = new St.Icon({ style_class: 'media-message-cover-icon' }); this.setIcon(this._icon); + // reclaim space used by unused elements + this._secondaryBin.hide(); + this._closeButton.hide(); + this._prevButton = this.addMediaControl('media-skip-backward-symbolic', () => { this._player.previous();